package com.lg.okframe.fragment;

import android.content.Context;
import android.graphics.Color;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.load.resource.bitmap.BitmapTransformation;
import com.lg.okframe.R;
import com.lg.okframe.activity.BookReadActivity;
import com.lg.okframe.activity.WebViewActivity;
import com.lg.okframe.activity.dfsfdsd;
import com.lg.okframe.adapter.ForumAdapter;
import com.lg.okframe.base.BaseFragment;
import com.lg.okframe.view.GlideRoundTransform;
import com.scwang.smartrefresh.header.CircleHeader;
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.yanzhenjie.album.Album;

/**
 * 论坛页面
 * Created by LG on 2018/7/31.
 */
public class ForumFragment extends BaseFragment {

    private RecyclerView forum_view;
    private ImageView show_show;
    private RelativeLayout menu_forum;

    @Override
    public void initData(Bundle savedInstanceState, Context context) {

    }

    @Override
    public void initView(View view, Context context) {

        forum_view = (RecyclerView) view.findViewById(R.id.forum_view);
        show_show = (ImageView) view.findViewById(R.id.show_show);
        menu_forum = (RelativeLayout) view.findViewById(R.id.menu_forum);
        forum_view.setLayoutManager(new LinearLayoutManager(getActivity()));
        ForumAdapter forumAdapter = new ForumAdapter(context, this);
        forum_view.setAdapter(forumAdapter);

        show_show.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (menu_forum.getVisibility() == View.GONE) {
                    menu_forum.setVisibility(View.VISIBLE);
                } else {
                    menu_forum.setVisibility(View.GONE);
                }
            }
        });
    }

    @Override
    public int setView() {
        return R.layout.forum_fagment;
    }


}
